#pragma once

#include "HalconCpp.h"
using namespace HalconCpp;

#include "list_message.h"

//#ifndef SAVE_IMAGE_H
//#define SAVE_IMAGE_H

#include <QThread>
#include <QObject>
#include<QDebug>
#include <string>
#include "opencv2/opencv.hpp"

#include <QMetaType>
#include<QImage>
using namespace std;


//class SaveImg:public::QObject
//{
//    Q_OBJECT


//public:
//    explicit SaveImg(QObject *parent = nullptr);
//    ~SaveImg();
//public slots:
//    void run();
//    //isaveOriImg鍙栧€间负1鏃惰〃绀哄瓨鐩告満閲囬泦鍒扮殑鍘熷浘锛屽彇鍊间负0鏃惰〃绀哄瓨缂洪櫡灏忓浘
//    void addImg(QString image_name , cv::Mat image);
//};



class SaveImageThread:public::QThread
{
    Q_OBJECT
public:
    ListMessgae<pair<string,HObject>>	m_list;		///< 待处理显示原始图像队列（输入图像缓冲）
    int m_bool_state= 1;

    explicit SaveImageThread(QObject *parent = nullptr);
    ~SaveImageThread();


    void addImage(string image_name , HObject image);

    virtual void run();

};


